home *** CD-ROM | disk | FTP | other *** search
/ Georgia Wildfire Prevention / Georgia Wildfire Prevention.iso / pc / media / dirs / BackUp / Launcher.dir / 00001_Script_WhichMovie next >
Text File  |  2001-06-04  |  4KB  |  133 lines

  1. --This function picks which movie will be played next.
  2. --PROPERTIES--
  3. --currentMovie: The movie that is open now.
  4. --Message: The message sent back from the currentMovie. Gives special instructions on where to go. Default = Next
  5. --NextMovie: The move to be opened next.
  6.  
  7. global HotField, Neptune, WhichTest
  8. property  NextMovie, UserInfo
  9.  
  10. on new me
  11.   the soundDevice = "QT3Mix"
  12.   WhichTest = "PreTest"
  13.   NextMovie = "Intro"
  14.   UserInfo = [:]
  15.   return me
  16. end
  17.  
  18. on WhichMovie me, message
  19.   sound(1).stop()
  20.   sound(2).stop()
  21.   if (NextMovie = "Test") and (WhichTest = "PostTest" or WhichTest = 2) then
  22.     NextMovie = "Credits"
  23.   else if Message = "Next" then
  24.     case (NextMovie) of
  25.       "Intro" : NextMovie = "Login"
  26.         Hotfield =  "First Name" 
  27.       "Login" : NextMovie = "Test"
  28.       "Test" : NextMovie = "MainMenu"
  29.       "WhatIsFire" : NextMovie = "MainMenu"
  30.       "GoodBad" : NextMovie = "MainMenu"
  31.       "WorkCenter" : NextMovie = "MainMenu"
  32.       "Reference" : NextMovie = "MainMenu"
  33.       "WildFire" : NextMovie = "FireTower"
  34.         Neptune = VOID        
  35.       "CampFire" : NextMovie = "FireTower"
  36.       "WildFire" : NextMovie = "FireTower"
  37.       "Home" : NextMovie = "FireTower"
  38.       "WildLife" : NextMovie = "FireTower"
  39.       "PrescribedBurn" : NextMovie = "FireTower"
  40.       "Glossary" : NextMovie = "Reference"
  41.       "FAQ" : NextMovie = "Reference"
  42.       "Internet" : NextMovie = "Reference"
  43.       "Resources" : NextMovie = "Reference"
  44.       "Guide" : NextMovie = "Reference"
  45.     end case
  46.   else
  47.     case (Message) of
  48.       "Exit" : WhichTest = "PostTest"
  49.         NextMovie = "Test"
  50.       "PreTest" : WhichTest = "PreTest"
  51.         NextMovie = "Test"
  52.       "PostTest" : WhichTest = "PostTest"
  53.         NextMovie = "Test"
  54.       "WhatIsFireActivity" : NextMovie = "WhatIsFire"
  55.       "Exclusion" : NextMovie = "WildFire"
  56.       "HomeActivity" : NextMovie = "Home"
  57.       "HomeTest" : NextMovie = "Home"
  58.       "PrescribedBurnActivity" : NextMovie =  "PrescribedBurn"
  59.       otherwise NextMovie = Message
  60.     end case
  61.   end if 
  62.   -------------For the Zeus Utility------------------
  63.   --  global gNextMovie, gWhichTest,gMessage, gTheData
  64.   --  gNextMovie = NextMovie
  65.   --  gWhichTest = WhichTest
  66.   --  gMessage = Message
  67.   --  gTheData = UserInfo
  68.   --  window("ZeusTool").windowtype = 4
  69.   --  open window("ZeusTool")
  70.   --  window("ZeusTool").moveToFront()
  71.   -----------------------------------------------------------
  72.   go frame 1 of movie NextMovie
  73. end
  74.  
  75. --adds elements to the user info list.
  76. on EnterData me, TheData
  77.   repeat with counter = 1 to count(TheData)
  78.     set PropName = getPropAt(TheData, Counter)
  79.     set PropValue = getAProp(TheData, PropName)
  80.     SetaProp( UserInfo, PropName, PropValue)
  81.   end repeat
  82. end
  83.  
  84. --Records the user's score.
  85. on RecordData me
  86.   TheScribe = new(xtra "FileIO")
  87.   set MyPath = getOsDirectory()
  88.   if the MachineType = 256 then
  89.     delim= "\"
  90.   else
  91.     delim=":"
  92.   end if
  93.   OrigDelim=the itemdelimiter
  94.   the itemdelimiter=delim
  95.   mypath=mypath.item[1]&delim
  96.   the itemdelimiter=OrigDelim
  97.   openfile(TheScribe, MyPath & "TestData.txt", 0)
  98.   ExistingInfo = readFile(TheScribe)
  99.   closefile(TheScribe)
  100.   createFile(TheScribe, MyPath & "TestData.txt")
  101.   openfile(TheScribe, MyPath & "TestData.txt", 0)
  102.   NL = numtochar(13)&numtochar(10)
  103.   writeString(TheScribe, ExistingInfo & \
  104.   "Name:     " & UserInfo.first && UserInfo.last & NL &\
  105.   "Address:  " & UserInfo.address & NL &\
  106.   "City:     " & UserInfo.city  & NL &\
  107.   "State:    " & UserInfo.state & NL &\
  108.   "Zip Code: " & UserInfo.zip & NL & NL &\
  109.   "PreTest Score:  " & UserInfo.pretest & NL &\
  110.   "PostTest Score: " & UserInfo.posttest  & NL & NL &\
  111.   "Logged In: " & UserInfo.DateTime & NL &\
  112.   "Finished:  " & the date && "-" && the time & NL &\
  113.   "--------------------------------" & NL)
  114.   closefile(TheScribe)
  115. end
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.